/* @(#)PubTool.java   
 *
 * Project: GS-1
 *
 * Modify Information:
 * =============================================================================
 *   Author       Date       Description
 *   ------------ ---------- ---------------------------------------------------
 *   Jenny Li    2006-7-13     新增
 *
 * Copyright Notice:
 * =============================================================================
 *    Copyright (c) 2001-2006 Beijing HiTRUST Technology Co., Ltd. 1808 Room, 
 *        Science & Technology Building, No. 9 South Street, Zhong Guan Cun, 
 *        Haidian District, Beijing ,100081, China All rights reserved.
 *
 *    This software is the confidential and proprietary information of
 *        Beijing HiTRUST Technology Co., Ltd. ("Confidential Information").
 *        You shall not disclose such Confidential Information and shall use it
 *        only in accordance with the terms of the license agreement you entered
 *        into with HiTRUST.
 *
 * Warning:
 * =============================================================================
 * 
 */
package com.hitrust.gs.util;

import java.io.File;
import java.math.BigDecimal;

/**
 * 
 */
public class PubTool {
    
    public static String apendSepa(String sPath){
        if (!sPath.endsWith(File.separator)) {
            sPath += File.separator;
        }
        return sPath;
    }

    /**
     * @param args
     */
    public static void main(String[] args) {
    // TODO Auto-generated method stub
        System.out.print(fmtDbl("1.10999999999999999"));

    }
    
    public static String fmtDbl(String value){
        String rt = "";
        BigDecimal bd = new BigDecimal(value);
        long tlng ;
        bd = bd.movePointRight(0);
        tlng = bd.longValue();
        bd = new BigDecimal(tlng);
        bd = bd.movePointLeft(0);
        rt = bd.toString();
        return rt;
    }

}
